chore(repo): Scoping Turborepo task inputs - #1882
Conversation
🦋 Changeset detectedLatest commit: 25b5840 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
brkalow
left a comment
There was a problem hiding this comment.
I love that you're using the per-workspace turbo.json files here!
c64e8e6 to
4be2951
Compare
4be2951 to
201750e
Compare
brkalow
left a comment
There was a problem hiding this comment.
One question about the dependsOn change for lint, otherwise this looks pretty good. Nice improvement!
|
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Speed up DX by scoping down the Turborepo inputs on particular tasks.
As-is, any changed file in a package results in Turborepo marking that package as altered. That slows down the DX as it requires a task (and, potentially, dependent tasks) to be re-run every time.
This PR ensures that only the relevant files are considered when Turborepo is making that determination.
There are a number of useful cases for this, like speeding up the turnaround time for developers running tasks like
npm run test.The convoluted example below might not seem like much, but it all adds up, especially, when the dependent tasks are further up the dependency graph.
Example:
You're testing a change you made to
@clerk/clerk-sdk-nodedirectly and your editing only your tests.Current
You run
npm run test -- --filter=@clerk/clerk-sdk-node:Because all files are considered for the dependent
buildtask, it's also re-run:@clerk/clerk-sdk-node:build(runs)@clerk/clerk-sdk-node:test(runs)New
You run
npm run test -- --filter=@clerk/clerk-sdk-node:Because only required files are considered for the dependent
build, it isn't re-run:@clerk/clerk-sdk-node:build(cached)@clerk/clerk-sdk-node:test(runs)Checklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore